package com.xquant.pricing.calc.entity;

import java.io.Serializable;

/**
 * 计算参数模板
 * @TableName CALCTEMPLATE
 */
public class CalcTemplate implements Serializable {
    /**
     * 一级分类
     */
    private String ptype;

    /**
     * 二级分类
     */
    private String stype;

    /**
     *
     */
    private String params;

    private static final long serialVersionUID = 1L;

    /**
     * 一级分类
     */
    public String getPtype() {
        return ptype;
    }

    /**
     * 一级分类
     */
    public void setPtype(String ptype) {
        this.ptype = ptype;
    }

    /**
     * 二级分类
     */
    public String getStype() {
        return stype;
    }

    /**
     * 二级分类
     */
    public void setStype(String stype) {
        this.stype = stype;
    }

    /**
     *
     */
    public String getParams() {
        return params;
    }

    /**
     *
     */
    public void setParams(String params) {
        this.params = params;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CalcTemplate other = (CalcTemplate) that;
        return (this.getPtype() == null ? other.getPtype() == null : this.getPtype().equals(other.getPtype()))
            && (this.getStype() == null ? other.getStype() == null : this.getStype().equals(other.getStype()))
            && (this.getParams() == null ? other.getParams() == null : this.getParams().equals(other.getParams()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getPtype() == null) ? 0 : getPtype().hashCode());
        result = prime * result + ((getStype() == null) ? 0 : getStype().hashCode());
        result = prime * result + ((getParams() == null) ? 0 : getParams().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", ptype=").append(ptype);
        sb.append(", stype=").append(stype);
        sb.append(", params=").append(params);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
